package utils
{
	import mx.core.Application;
	
	public class Trace
	{
		public static function myTrace( s:String ):void {
			trace( s );
		}
		public static function execCommTrace( functName:String, target:String, command:String, paramArr:Array ):void {
			switch( target.toLowerCase() ){
				// eC's to silence in this list
				case "sound":
				case "soundcontrolas":
				case "scriptlauncher":
				case "thing":
				case "cwthing":
				case "gamescreen":
				case "actor":
					// nuttin
				break;
				case "game":
				case "script":
					myTrace(functName+": "+target+" "+command+" "+paramArr);
				break;
				default:
					Trace.throwError("Trace.execCommTrace Can't handle target: "+target);
				break;
			}
		}
		public static function throwError( e:String ):void {
			throw new Error( e );
		}
	}	
}
